<% content_tag :div, :class => 'bigwrapper' do%>
<%= flash[:error] %>
	<% content_tag :div, :class => 'header' do -%>
		<%= content_tag :img, nil, :src => '/images/icons/icons_34.png', :class => 'hleft' %>
		<%= content_tag :span, 'New Line Item',:class => 'hleft' %>
		<% content_tag :span, :class => 'headertext' do -%>
			<%= content_tag :strong, 'Welcome to Sparktools!' -%>
			<%= content_tag :p, "Line items are individual debits or credits to a particular fund. Fill out all the options below to create a new line item. Starred (<span class='red'>*</span>) items are required. " -%>
		<% end -%>
	<% end -%>
	<% form_tag :action => 'new' do -%>
		<%= hidden_field :line_item, :group_id, :value => @group_id %>
		<%= hidden_field :line_item_entry, :status, :value => "Unopened"%>
		<% content_tag :div, :class => 'mainbox' do %>
			<%= content_tag :h3, '1. Fund association'%>
			<%= content_tag :span, "Select the fund that this line item belongs to (<span class='red'>*</span>): " %>
			<%= content_tag(:span,select(:line_item, :fund_id, @funds.collect {|p| [p.first_entry.name, p.id]}, { :include_blank => true, :selected => params[:fund_id].to_i }))%>
		<% end -%>
		<% content_tag :div, :class => 'mainbox' do %>
			<%= content_tag :h3, '2. Description'%>
			<%= content_tag :p, "Title for line item (<span class='red'>*</span>): " %>
			<%= content_tag(:div,text_field(:line_item_entry, :name)) %>
			<%= content_tag :p, "Description for line item (<span class='red'>*</span>): " %>
			<%= content_tag(:div,text_area(:line_item_entry, :note, {:size=>"70x4"})) %>
		<% end -%>
			<% content_tag :div, :class => 'mainbox' do -%>
				<%= content_tag :h3, '3. Amount'%>
				<%= content_tag :p, "Line item value (use a '-' symbol to denote a debit) (<span class='red'>*</span>): " %>
				<%= content_tag(:div,text_field(:line_item_entry, :amount)) %>
			<% end -%>
			<% content_tag :div, :class => 'mainbox' do -%>
				<%= content_tag :h3, '4. Save'%>
				<%= content_tag :p, "Once everything is filled out, click save to create this action item." %>
				<%= submit_tag 'Create Line Item' %>
			<% end -%>
	<% end %>
<% end -%>